This loop has many early exits, and all of them
need to free this info object that gets allocated
at the beginning.
attr = ippNextAttribute (response);
if (attr == NULL)
- break;
+ {
+ printer_setup_info_free (info);
+ break;
+ }
while (attr != NULL && ippGetGroupTag (attr) == IPP_TAG_PRINTER)
{
if (info->printer_name == NULL ||
(info->printer_uri == NULL && info->member_uris == NULL))
{
+ printer_setup_info_free (info);
if (attr == NULL)
break;
else
iter = g_list_find_custom (GTK_PRINT_BACKEND_CUPS (backend)->temporary_queues_removed,
info->printer_name, (GCompareFunc) g_strcmp0);
if (iter != NULL)
- continue;
+ {
+ printer_setup_info_free (info);
+ continue;
+ }
if (info->got_printer_type)
{